structured logging: JSON and journald#2897
Conversation
0840e06 to
e576249
Compare
|
Both I think that we can now start discussing what extra fields we might want/need. (Like the file paths shown in debug flags) Regarding the blunt patch into dnsmasq to prevent it from messing with our file descriptors, I definitely need to guidance here on whether this is a good mean or if there is a better way. |
|
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/use-systemd-journalctl-for-all-logs/84443/21 |
8e7fd91 to
7846900
Compare
We never read from FTL.log and webserver.log after opening them, so +read is unnecessary. Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
carries to: FIFO, webserver.log changes webserver.log format (again) Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
they are not useful here as they would only show the component again Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
This allows shipping fully static binaries with --log-journal support Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
This helps the clangd LSP find headers and improves expericence in editors/IDEs Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
7846900 to
0c6ea36
Compare
|
We probably don't want all (This was a container without any queries received...) |
|
These are normal lines from If I'm not mistaken, they are generated by the container health check, every 30 seconds. Do you think |
No. I think we should have an option to disable |
I'm not sure if I understand the question, but what else should the logfile be besides plain text? I do think that we should have all logs available with Maybe we can add an option to exclude query-level information, but this information would also be added to pihole.log anyway. Disk usage wise, I don't think it's so bad. (I have been using I think the ability to just filter for FTL logs again offsets the raw verbosity. Edit: how it compares to other services: |
Currently (in I think there are 2 distinct ideas being developed together:
|
My idea was to not change the logfiles to JSON, but instead have a unified JSON stream in stdout where all three are included, which allows filtering with By sending all logs to docker stdout, users (or rather machines) won't have to touch the files at all anymore and can just parse and filter the stdout. |
See pi-hole/docker-pi-hole#2036 for more information.
Major issue:
dnsmasqcloses the file descriptors of STDIN, STDOUT and STDERR, this prevents us from logging after dnsmasq has started. Removing the lines is only a quick duct-tape fix while developing.Removing that code seems to be the best option, as it also doesn’t affect other functionality.
This can also be observed in the systemd service log, since it only contains startup information and not the entire FTL.log.
In docker we are not capturing stdout, but tailing the logfile, but I intentionally wanted to keep the logfiles as-is, need to find a solution on how to implement this.
This currently changes webserver.log and the dnsmasq and webserver FIFOs to better align with FTL.log, but this can be reverted if necessary.
What does this PR aim to accomplish?:
How does this PR accomplish the above?:
Link documentation PRs if any are needed to support this PR:
By submitting this pull request, I confirm the following:
git rebase)